/*
 * AudioDevice.h
 *
 *  Created on: 2016年4月13日
 *      Author: terry
 */

#ifndef AUDIODEVICE_H_
#define AUDIODEVICE_H_

#include "BasicType.h"
#include "Ffmpeg.h"

namespace av
{

class AudioDevice
{
public:
	virtual ~AudioDevice() {}

	virtual bool open(int channels, int rate, int sampleBits) =0;

	virtual void close() =0;

	virtual bool isOpen() =0;

	virtual void write(AVFrame* frame) =0;

	virtual void pause(bool toPause) =0;

	virtual void flush() =0;

	virtual bool isPaused() =0;

	virtual float getVolume() =0;

	virtual int setVolume(float vol) =0;

	virtual bool isMute() =0;

	virtual int setMute(bool muted) =0;

	virtual int64_t getCurTime(int64_t* pClock) =0;

    virtual void setScale(AVRational scale) =0;

    virtual void dropTo(int64_t pts) =0;

    virtual void setLiveMode(bool isLive) =0;

    virtual void setMaxDuration(int duration) =0;

};



} /* namespace av */

#endif /* AUDIODEVICE_H_ */
